﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="Site.Master" CodeBehind="Advertisements.aspx.vb" MaintainScrollPositionOnPostback="true"
    Inherits="DotNetCore.BannerManagement.Advertisements" Title="Banner Management - Advertisements" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <div style="color:Red;">Please take care, no validation is done on any data input</div>
    <asp:GridView ID="gvAdvertisements" runat="server" DataKeyNames="ID" AutoGenerateSelectButton="false" AutoGenerateColumns="false">
        <EmptyDataTemplate>
            There are no advertisements
        </EmptyDataTemplate>
        <Columns>
            <asp:CommandField HeaderText="Edit" ShowEditButton="true" EditText="Edit" />
            <asp:BoundField HeaderText="Active" DataField="Active" />
            <asp:BoundField HeaderText="Name" DataField="Name" />
            <asp:BoundField HeaderText="URL" DataField="URL" />
           <asp:TemplateField HeaderText="Image">
            <ItemTemplate >
                  <img src='../Advertisement/LoadBanner.aspx?ID=<%#Eval("ID") %>' alt='Image' />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:FileUpload ID="upImage" runat="server" />
            </EditItemTemplate>
           </asp:TemplateField>
           
            <asp:BoundField HeaderText="Alternate Text" DataField="AlternateText" />
            <asp:BoundField HeaderText="Start Date" DataField="StartDate" />
            <asp:BoundField HeaderText="End Date" DataField="EndDate" />
        </Columns>
    </asp:GridView>
</asp:Content>
